package com.atguigu.lease.common.context;
/*
*   维护 ThreadLocal本地线程对象
* */
public class LoginUserContext {

     private  static  final ThreadLocal<LoginUser> threadLocal = new ThreadLocal<>();
     //baocun
     public  static void set(LoginUser loginUser){
         threadLocal.set(loginUser);
     }
     //huoqu
     public  static LoginUser get(){
     return    threadLocal.get();
    }
    //shanchu
     public  static void remove(){
        threadLocal.remove();
    }

}
